package com.huashi.dealer.commonEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 积分记录实体类
 * 对应PHP的user/PointsLog.php
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "积分记录实体")
public class PointsLog extends BaseModel {

    /**
     * 积分记录ID
     */
    @TableId(value = "points_log_id", type = IdType.AUTO)
    @Schema(description = "积分记录ID")
    private Long pointsLogId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 积分类型：10获得，20消费
     */
    @TableField("points_type")
    @Schema(description = "积分类型：10获得，20消费")
    private Integer pointsType;

    /**
     * 积分数量
     */
    @TableField("points")
    @Schema(description = "积分数量")
    private Integer points;

    /**
     * 积分描述
     */
    @TableField("description")
    @Schema(description = "积分描述")
    private String description;

    /**
     * 关联订单ID
     */
    @TableField("order_id")
    @Schema(description = "关联订单ID")
    private Long orderId;

    /**
     * 关联商品ID
     */
    @TableField("goods_id")
    @Schema(description = "关联商品ID")
    private Long goodsId;

    /**
     * 积分变动前数量
     */
    @TableField("before_points")
    @Schema(description = "积分变动前数量")
    private Integer beforePoints;

    /**
     * 积分变动后数量
     */
    @TableField("after_points")
    @Schema(description = "积分变动后数量")
    private Integer afterPoints;
} 